.class public Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;
.super Lcom/bitauto/autoeasy/BaseActivity;
.source "DealerDetailActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Landroid/widget/AdapterView$OnItemClickListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity$downLoadTask;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/bitauto/autoeasy/BaseActivity;",
        "Landroid/view/View$OnClickListener;",
        "Landroid/widget/AdapterView$OnItemClickListener;"
    }
.end annotation


# instance fields
.field private final MapUrl:Ljava/lang/String;

.field private final VENDORID:Ljava/lang/String;

.field private final VENDORNAME:Ljava/lang/String;

.field private button01:Landroid/widget/Button;

.field private button02:Landroid/widget/Button;

.field private button03:Landroid/widget/Button;

.field private carImage:Lcom/bitauto/autoeasy/widget/RemoteImageView;

.field private carname:Landroid/widget/TextView;

.field private changjzdjia:Landroid/widget/TextView;

.field private contentResolver:Landroid/content/ContentResolver;

.field private dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

.field private flag:Z

.field private jingxiaosbj:Landroid/widget/TextView;

.field private list:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/news/Object/Promotion;",
            ">;"
        }
    .end annotation
.end field

.field private listView:Landroid/widget/ListView;

.field private promotionAdapter:Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;

.field private promotion_url:Ljava/lang/String;

.field private view:Landroid/view/View;

.field private view01:Landroid/widget/TextView;

.field private view02:Landroid/widget/TextView;

.field private view03:Landroid/widget/TextView;

.field private view05:Landroid/widget/TextView;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 38
    invoke-direct {p0}, Lcom/bitauto/autoeasy/BaseActivity;-><init>()V

    .line 41
    const-string v0, "VendorID"

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->VENDORID:Ljava/lang/String;

    .line 42
    const-string v0, "vendorName"

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->VENDORNAME:Ljava/lang/String;

    .line 57
    const-string v0, ""

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->promotion_url:Ljava/lang/String;

    .line 58
    const-string v0, "http://ditu.google.cn/maps?hl=zh&mrt=loc&q="

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->MapUrl:Ljava/lang/String;

    .line 38
    return-void
.end method

.method static synthetic access$0(Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;)Lcom/bitauto/autoeasy/selectcar/Object/Dealer;
    .locals 1
    .parameter

    .prologue
    .line 44
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    return-object v0
.end method

.method static synthetic access$1(Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 57
    iput-object p1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->promotion_url:Ljava/lang/String;

    return-void
.end method


# virtual methods
.method public deleteDealer()V
    .locals 4

    .prologue
    .line 260
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->contentResolver:Landroid/content/ContentResolver;

    .line 261
    sget-object v1, Lcom/bitauto/autoeasy/db/provider/FAV_DEALERContentProvider;->CONTENT_URI:Landroid/net/Uri;

    .line 262
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "dealer_id = "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 263
    iget-object v3, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v3}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorID()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    .line 262
    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 263
    const/4 v3, 0x0

    .line 260
    invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    .line 264
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorName()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "-\u5df2\u4ece\u6536\u85cf\u5939\u79fb\u9664"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {p0, v0}, Lcom/bitauto/autoeasy/tool/ToolBox;->showToast(Landroid/content/Context;Ljava/lang/String;)V

    .line 265
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->button01:Landroid/widget/Button;

    const-string v1, "\u6536\u85cf"

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 266
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->flag:Z

    .line 267
    return-void
.end method

.method public downLoadData()V
    .locals 4

    .prologue
    .line 114
    new-instance v0, Lcom/bitauto/autoeasy/selectcar/Object/DealerDetailParser;

    .line 115
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "http://m.bitauto.com/iphoneapi/v2/getvendor/?id="

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v2

    const-string v3, "VendorID"

    invoke-virtual {v2, v3}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 114
    invoke-direct {v0, v1}, Lcom/bitauto/autoeasy/selectcar/Object/DealerDetailParser;-><init>(Ljava/lang/String;)V

    .line 116
    .local v0, dealerDetailParser:Lcom/bitauto/autoeasy/selectcar/Object/DealerDetailParser;
    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/DealerDetailParser;->Paser2Object()V

    .line 117
    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/DealerDetailParser;->getDealer()Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    move-result-object v1

    iput-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    .line 118
    invoke-super {p0}, Lcom/bitauto/autoeasy/BaseActivity;->downLoadData()V

    .line 119
    return-void
.end method

.method public downloadPromotion()V
    .locals 2

    .prologue
    .line 166
    new-instance v0, Lcom/bitauto/autoeasy/news/Object/PromotionParser;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->promotion_url:Ljava/lang/String;

    invoke-direct {v0, v1}, Lcom/bitauto/autoeasy/news/Object/PromotionParser;-><init>(Ljava/lang/String;)V

    .line 167
    .local v0, promotionParser:Lcom/bitauto/autoeasy/news/Object/PromotionParser;
    invoke-virtual {v0}, Lcom/bitauto/autoeasy/news/Object/PromotionParser;->Paser2Object()Ljava/util/ArrayList;

    move-result-object v1

    iput-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->list:Ljava/util/ArrayList;

    .line 168
    return-void
.end method

.method public initView()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 80
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "vendorName"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->setTitle(Ljava/lang/CharSequence;)V

    .line 82
    const v0, 0x7f0b01ae

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->view:Landroid/view/View;

    .line 83
    const v0, 0x7f0b002c

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->jingxiaosbj:Landroid/widget/TextView;

    .line 84
    const v0, 0x7f0b002e

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->changjzdjia:Landroid/widget/TextView;

    .line 86
    const v0, 0x7f0b01af

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->carname:Landroid/widget/TextView;

    .line 87
    const v0, 0x7f0b002a

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/bitauto/autoeasy/widget/RemoteImageView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->carImage:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    .line 89
    const v0, 0x7f0b0059

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->view01:Landroid/widget/TextView;

    .line 90
    const v0, 0x7f0b005b

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->view02:Landroid/widget/TextView;

    .line 91
    const v0, 0x7f0b005d

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->view03:Landroid/widget/TextView;

    .line 92
    const v0, 0x7f0b01b2

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->view05:Landroid/widget/TextView;

    .line 94
    const v0, 0x7f0b01b4

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->button01:Landroid/widget/Button;

    .line 95
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->button01:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 96
    const v0, 0x7f0b01b6

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->button02:Landroid/widget/Button;

    .line 97
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->button02:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 98
    const v0, 0x7f0b01b5

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->button03:Landroid/widget/Button;

    .line 99
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->button03:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 101
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "is_fav"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 103
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->button01:Landroid/widget/Button;

    invoke-virtual {v0, v2}, Landroid/widget/Button;->setVisibility(I)V

    .line 106
    :cond_0
    const v0, 0x102000a

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ListView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->listView:Landroid/widget/ListView;

    .line 107
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->listView:Landroid/widget/ListView;

    invoke-virtual {v0, p0}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 109
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->contentResolver:Landroid/content/ContentResolver;

    .line 110
    return-void
.end method

.method public isExit()Z
    .locals 7

    .prologue
    const/4 v2, 0x0

    .line 221
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->contentResolver:Landroid/content/ContentResolver;

    .line 222
    sget-object v1, Lcom/bitauto/autoeasy/db/provider/FAV_DEALERContentProvider;->CONTENT_URI:Landroid/net/Uri;

    .line 224
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "dealer_id = "

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 225
    iget-object v4, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v4}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorID()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    .line 224
    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    move-object v4, v2

    move-object v5, v2

    .line 221
    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 226
    .local v6, cursor:Landroid/database/Cursor;
    if-eqz v6, :cond_0

    invoke-interface {v6}, Landroid/database/Cursor;->getCount()I

    move-result v0

    if-lez v0, :cond_0

    .line 227
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->button01:Landroid/widget/Button;

    const v1, 0x7f080002

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(I)V

    .line 228
    const/4 v0, 0x1

    .line 230
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public onClick(Landroid/view/View;)V
    .locals 6
    .parameter "v"

    .prologue
    .line 182
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v3

    packed-switch v3, :pswitch_data_0

    .line 213
    :goto_0
    return-void

    .line 184
    :pswitch_0
    new-instance v1, Landroid/content/Intent;

    const-string v3, "android.intent.action.VIEW"

    .line 185
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "http://ditu.google.cn/maps?hl=zh&mrt=loc&q="

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v5, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v5}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getGoogleMapLat()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, ","

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    .line 186
    iget-object v5, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v5}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getGoogleMapLng()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    .line 185
    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v4

    .line 184
    invoke-direct {v1, v3, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 187
    .local v1, mapI:Landroid/content/Intent;
    invoke-virtual {p0, v1}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    .line 200
    .end local v1           #mapI:Landroid/content/Intent;
    :pswitch_1
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "tel:"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v4, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v4}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getCallCenterNumber()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    .line 201
    .local v2, uri:Landroid/net/Uri;
    new-instance v0, Landroid/content/Intent;

    const-string v3, "android.intent.action.DIAL"

    invoke-direct {v0, v3, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 202
    .local v0, it:Landroid/content/Intent;
    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    .line 205
    .end local v0           #it:Landroid/content/Intent;
    .end local v2           #uri:Landroid/net/Uri;
    :pswitch_2
    iget-boolean v3, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->flag:Z

    if-eqz v3, :cond_0

    .line 206
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->deleteDealer()V

    goto :goto_0

    .line 208
    :cond_0
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->saveDealer()V

    goto :goto_0

    .line 182
    :pswitch_data_0
    .packed-switch 0x7f0b01b4
        :pswitch_2
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 4
    .parameter "savedInstanceState"

    .prologue
    const/4 v2, 0x1

    .line 63
    invoke-super {p0, p1}, Lcom/bitauto/autoeasy/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    .line 64
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "gone"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 65
    const v0, 0x7f030023

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->setLayout(I)V

    .line 69
    :goto_0
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "vendorName"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->setTitleContent(Ljava/lang/String;)V

    .line 70
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->initView()V

    .line 72
    new-instance v0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity$downLoadTask;

    invoke-direct {v0, p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity$downLoadTask;-><init>(Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;)V

    new-array v1, v2, [Ljava/lang/String;

    const/4 v2, 0x0

    const-string v3, ""

    aput-object v3, v1, v2

    invoke-virtual {v0, v1}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity$downLoadTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 74
    return-void

    .line 67
    :cond_0
    const v0, 0x7f030024

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->setLayout(I)V

    goto :goto_0
.end method

.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 3
    .parameter
    .parameter "view"
    .parameter "position"
    .parameter "id"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView",
            "<*>;",
            "Landroid/view/View;",
            "IJ)V"
        }
    .end annotation

    .prologue
    .line 272
    .local p1, parent:Landroid/widget/AdapterView;,"Landroid/widget/AdapterView<*>;"
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/bitauto/autoeasy/selectcar/PromotionDetailActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 273
    .local v0, intent:Landroid/content/Intent;
    const-string v2, "newsid"

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->list:Ljava/util/ArrayList;

    invoke-virtual {v1, p3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/bitauto/autoeasy/news/Object/Promotion;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/news/Object/Promotion;->getID()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 274
    const-string v1, "title"

    const-string v2, "\u4f18\u60e0\u4fe1\u606f"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 275
    const-string v2, "title1"

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->list:Ljava/util/ArrayList;

    invoke-virtual {v1, p3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/bitauto/autoeasy/news/Object/Promotion;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/news/Object/Promotion;->getTitle()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 276
    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->startActivity(Landroid/content/Intent;)V

    .line 278
    return-void
.end method

.method public refreshView()V
    .locals 3

    .prologue
    .line 122
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->isExit()Z

    move-result v0

    iput-boolean v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->flag:Z

    .line 123
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->view01:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorFullName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 124
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->view02:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorSaleAddr()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 125
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->view03:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getCallCenterNumber()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 126
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->view05:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorsite()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 128
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->carname:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 129
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->jingxiaosbj:Landroid/widget/TextView;

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    const-string v2, "vendorprice"

    invoke-virtual {v1, v2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 130
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->changjzdjia:Landroid/widget/TextView;

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    const-string v2, "averageprice"

    invoke-virtual {v1, v2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 132
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->carImage:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    const v1, 0x7f020008

    invoke-virtual {v0, v1}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setBackgroundResource(I)V

    .line 133
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->carImage:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getImage()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setImageUrl(Ljava/lang/String;)V

    .line 135
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->downloadPromotion()V

    .line 136
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->setPromotionView()V

    .line 137
    return-void
.end method

.method public saveDealer()V
    .locals 4

    .prologue
    .line 240
    new-instance v0, Landroid/content/ContentValues;

    invoke-direct {v0}, Landroid/content/ContentValues;-><init>()V

    .line 241
    .local v0, cv:Landroid/content/ContentValues;
    const-string v1, "dealer_id"

    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v2}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorID()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 242
    const-string v1, "dealer_name"

    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v2}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 243
    const-string v1, "dealer_mode"

    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v2}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorBizMode()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 244
    const-string v1, "dealer_phone"

    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v2}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getCallCenterNumber()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 245
    const-string v1, "dealer_add"

    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {v2}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorSaleAddr()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 246
    const-string v1, "dealer_price"

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v2

    const-string v3, "vendorprice"

    invoke-virtual {v2, v3}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 247
    const-string v1, "car_name"

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v2

    const-string v3, "carname"

    invoke-virtual {v2, v3}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 248
    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->contentResolver:Landroid/content/ContentResolver;

    sget-object v2, Lcom/bitauto/autoeasy/db/provider/FAV_DEALERContentProvider;->CONTENT_URI:Landroid/net/Uri;

    invoke-virtual {v1, v2, v0}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    .line 249
    const v1, 0x7f080003

    invoke-static {p0, v1}, Lcom/bitauto/autoeasy/tool/ToolBox;->showToast(Landroid/content/Context;I)V

    .line 250
    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->button01:Landroid/widget/Button;

    const v2, 0x7f080002

    invoke-virtual {v1, v2}, Landroid/widget/Button;->setText(I)V

    .line 251
    const/4 v1, 0x1

    iput-boolean v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->flag:Z

    .line 252
    return-void
.end method

.method public setPromotionView()V
    .locals 3

    .prologue
    .line 171
    new-instance v0, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->list:Ljava/util/ArrayList;

    .line 172
    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->listView:Landroid/widget/ListView;

    invoke-direct {v0, v1, p0, v2}, Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;-><init>(Ljava/util/ArrayList;Landroid/content/Context;Landroid/widget/ListView;)V

    .line 171
    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->promotionAdapter:Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;

    .line 173
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->list:Ljava/util/ArrayList;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->list:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lez v0, :cond_0

    .line 174
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->listView:Landroid/widget/ListView;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/DealerDetailActivity;->promotionAdapter:Lcom/bitauto/autoeasy/selectcar/Adapter/PromotionAdapter;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 178
    :cond_0
    return-void
.end method
